<template>
  <div class="home" ref="home">
    数据报表
  </div>
</template>

<script setup>
import {onMounted, reactive, ref} from "vue";
import * as echarts from "echarts"
import request from "../request.js";
let myChart = ref(null)
let home = ref(null)
const state = reactive({
  dataList:{},
  outPut:[],
  cart:{}
})
let goodsName = reactive([])
let nums = reactive([])
onMounted(async () => {
  myChart.value = echarts.init(home.value)
  const load = () => {

  }
  myChart.value.setOption(

      {
        tooltip: {
          trigger: 'item'
        },
        title:{
          text:'安全防护'
        },
        legend: {
          top: '5%',
          left: 'center'
        },
        series: [
          {
            name: 'Access From',
            type: 'pie',
            radius: ['40%', '70%'],
            avoidLabelOverlap: false,
            itemStyle: {
              borderRadius: 10,
              borderColor: '#fff',
              borderWidth: 2
            },
            label: {
              show: false,
              position: 'center'
            },
            emphasis: {
              label: {
                show: true,
                fontSize: 40,
                fontWeight: 'bold'
              }
            },
            labelLine: {
              show: false
            },
            data: [
              { value: 1048, name: '下载' },
              { value: 735, name: '漏洞' },
              { value: 580, name: '上传' },
              { value: 484, name: '跳转' },
              { value: 300, name: 'root' }
            ]
          }
        ]
      }
  )

})
</script>

<style scoped lang="scss">
.home{
  height: 380px;
}

</style>